<template>
    <div>
      <button @click="sub">-</button>
      {{quatity}}
      <button @click="add">+</button>
    </div>
</template>

<script>
export default {
    props:[
        "quatity",
        "index",

    ],
    methods:{
        add(){
            this.$emit("add",this.index)
        },
        sub(){
            this.$emit("sub",this.index)
        }
    }
}
</script>